package com.example.tests;

import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {

  @Test
  public void testNonEmptyContactCreation() throws Exception {
    openURL();
    openMainPage();
    initContactCreation();
    ContactData contact = new ContactData();
    contact.firstname = "Alexander";
    contact.lastname = "Gross";
    contact.address = "SPb, Nevskiy, 100";
    contact.telhome = "111-11-11";
    contact.telmobile = "222-22-22";
    contact.telwork = "333-33-33";
    contact.email = "gross@list.ru";
    contact.email2 = "gross@mail.ru";
    contact.bday = "27";
    contact.bmonth = "November";
    contact.byear = "2000";
    contact.belonggroup = "Rob";
    fillContactForm(contact);
    submitContactCreation();
    openMainPage();
  }

  @Test
  public void testEmptyContactCreation() throws Exception {
    openURL();
    openMainPage();
    initContactCreation();
    fillContactForm(new ContactData("", "", "", "", "", "", "", "", "-", "-", "", ""));
    submitContactCreation();
    openMainPage();
  }
}
